<template>
	<view class="content">
		<view class="header">
			<u-collapse :item-style="itemStyle" accordion>
				<u-collapse-item :index="index" :list="itemList" :title="item.title" v-for="(item, index) in itemList"
					:key="index">
					<view class="collapse-item" v-html="item.content"></view>
				</u-collapse-item>
			</u-collapse>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			itemStyle: {
				borderBottom: '1px solid #CECECE',
				paddingBottom: '10px',
				paddingTop: "10px",
				backgroundColor: '#fff',
				fontSize: "32"
			},
			itemList: [],
			// page: 1
		};
	},
	onShow() {
		this.getlist();


	},
	// onPullDownRefresh() {
	// 	this.page = 1;
	// 	this.getlist();
	// },
	methods: {
		getlist() {
			let data = {
				cat_id: 1
			};
			this.$Request.get(this.$api.index.catList, data).then(res => {
				// uni.stopPullDownRefresh();
				this.itemList = res.data.list;
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.content {
	min-height: 100vh;
	box-sizing: border-box;
	padding-top: 20rpx;
	background-color: #262626;

	.header {
		margin-top: 60rpx;
		width: 750rpx;
		background: #262626;
		border-radius: 16rpx;
		margin: 0 auto;
		padding: 0 37rpx;
	}
}
/deep/.u-collapse-item{
background: #262626 !important;
}
/deep/.u-collapse-item:last-child {
	border-bottom: 1rpx solid #FED187 !important;
}
/deep/.u-collapse-head{
	color: white !important;
}
</style>
